:: this script automates qt deployment under windows. it gets called automatically by qmake
:: as a pre-link step. paths are relative to the build directory.
:: created by R. Marson. Last edited May 10 2011.

:: cmake -G "Visual Studio 10"

:: for eclipse - mingw:
:: note: for eclipse to work properly mingw must have already been set in system environment variables
:: PATH=%PATH%;c:\MinGW\bin

SET DRIVE=E:
SET USE_CL=n

SET /P USE_CL=Use Clang? (y/n): %=%

IF "%USE_CL%"=="y" SET CC=%DRIVE%\MinGW\bin\clang.exe
IF "%USE_CL%"=="y" SET CXX=%DRIVE%\MinGW\bin\clang++.exe

IF "%USE_CL%"=="n" SET CC=%DRIVE%\MinGW\bin\gcc.exe
IF "%USE_CL%"=="n" SET CXX=%DRIVE%\MinGW\bin\g++.exe

rem cmake -G "Eclipse CDT4 - MinGW Makefiles"
cmake -G "Eclipse CDT4 - MinGW Makefiles"

SET AUTO_BUILD=n

SET /P AUTO_BUILD=Build Project? (y/n): %=%

IF "%AUTO_BUILD%"=="y"  "%DRIVE%\MinGW\bin\mingw32-make.exe"

SET RUN=n

SET /P RUN=Run Executable? (y/n): %=%

IF "%RUN%"=="y" cd .\bin
IF "%RUN%"=="y" "OpenPool.exe"
IF "%RUN%"=="y" cd ..
